<template>
	<view >
	<u-cell-group class="scoreLog" v-for="item in scoreLog" >
	    <u-cell 
	        :title="item.typeStr"
	       
	        :label="item.dateAdd"
	        center
			:border=false
	    >
		<text v-if="item.behavior==0"
		style="color: green;"
		    slot="value"
		    class="u-slot-value"
		>+{{item.score}}</text>
		<text v-else="item.behavior==1"
		style="color: red;"
		    slot="value"
		    class="u-slot-value"
		>{{item.score}}</text>
		
		</u-cell>
		
	</u-cell-group>	
	</view>
</template>

<script>
	import {_scoreLog} from "../../api/scoreLog.js"
	export default {
		data() {
			return {
				scoreLog:[],
				id:[]
			}
		},
		methods: {
			getscoreLog(){
				_scoreLog().then(res=>{
					console.log(res)
					if(res.code===0){
					this.scoreLog=res.data.result
			
					}
				})
			}
		},
		onReady(){
			this.getscoreLog()
		}
	}
</script>

<style>

</style>
